﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using LotteryWCF.Constract;
namespace LotteryWCF
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IService1”。
    [ServiceContract]
    public interface ILotteryService
    {
        [OperationContract]
        User GetUserInfo(string userid);

        [OperationContract]
        Capital GetCapitalInfo(string userid);

        [OperationContract]
        bool ValidateLogin(string userid, string userpwd);

        [OperationContract]
        void LoginOut(string userid);

        [OperationContract]
        BonusInfo GetBonusInfo(string userid, int playTypeId, int lotteryTypeId, int playtyperadioId);

        [OperationContract]
        void ModifyPassword(string userid, string userpwd);

        [OperationContract]
        List<BankInfo> GetBankInfo(string userid);

        [OperationContract]
        bool ValidateBankPassword(string userid, string bankPwd);

        [OperationContract]
        int ApplyMoneyOut(string userid, double money, double oneDayMoney, int oneDayTimes, string BankType);

        [OperationContract]
        List<CarrierBankInfo> GetCarrierBankInfo();

        [OperationContract]
        void ModifyBankPwd(string userid, string userpwd);

        [OperationContract]
        int InsertBetRecord(BetRecord record);

        [OperationContract]
        int InsertUser(User user);

        [OperationContract]
        bool UpdateBonus(BonusInfo bonus);

        [OperationContract]
        List<LotteryTypeInfo> GetLotteryType();

        [OperationContract]
        bool SetBankInfo(string userid, string BankType, string accountName, string BankPwd, string cardNo);

        [OperationContract]
        List<PlayTypeInfo> GetPlayType(int LotteryId);

        [OperationContract]
        List<PlayTypeRadioInfo> GetPlayTypeRadio();

        [OperationContract]
        List<PlayTypeNumInfo> GetPlayTypeNum();

        [OperationContract]
        List<PlayTypeInfo> GetPlayTypeInfo();

        [OperationContract]
        List<Dictionary<string, string>> GetOdds(int playTypeId, int PlayTypeRadioID, string IssueNo);

        [OperationContract]
        bool AddLowerInfo(LowerInfo info);

        [OperationContract]
        bool EditLowerInfo(LowerInfo info);

        [OperationContract]
        List<LowerListData> GetLowerListData(Int64 ID);

        [OperationContract]
        List<LowerListData> GetLowerListDataByUID(string UID, Int64 ID);

        [OperationContract]
        LotteryNumsInfo GetCurrenIssuNo(int lotteryId);

        [OperationContract]
        LotteryNumsInfo GetLastLotteryNum(int lotteryId);

        [OperationContract]
        List<LotteryNumsInfo> GetRecentlyLotteryNum(int lotteryId);

        [OperationContract]
        List<BetRecord> GetBetRecord(string userid);

        [OperationContract]
        int InsertProfitLoss(ProfitLossInfo info);

        //[OperationContract]
        //int InsertWinLottery(WinLotteryInfo info);

        [OperationContract]
        DateTime GetServerCurrentTime();

        [OperationContract]
        List<ProfitLossInfo> GetPfLoss_CZandTX(string userId);

        [OperationContract]
        List<ProfitLossInfo> GetPfLoss_TX_Pct(string userId);

        [OperationContract]
        List<PfLossMsg> GetPfLoss_YK(string userId, string IssueNo);

        [OperationContract]
        List<User> GetAllParentUser(string userId);

        [OperationContract]
        List<StatReport> GetStatReport(Int64 ID, DateTime start, DateTime end);

        [OperationContract]
        List<ReportDetail> GetReportDetail(string UID, DateTime start, DateTime end);

        [OperationContract]
        List<ProfitReport> GetProfitReport(Int64 ID, DateTime start, DateTime end);

        [OperationContract]
        List<ProfitDetail> GetProfitDetail(string UID, DateTime start, DateTime end);

        [OperationContract]
        OrderContent GetOrderContent(Int64 RecordID);

        [OperationContract]
        List<BetRecord> GetTopTenWinInfo(int lotteryId);

        [OperationContract]
        LotteryNumsInfo GetNewLotteryNum(int lotteryId, string issueNo);

        [OperationContract]
        List<string> GetNewsInfo();

        [OperationContract]
        Dictionary<string, string> GetOverAllCfg();

        [OperationContract]
        int GetMultipleByPlayTypeId(int PlayTypeId);

        [OperationContract]
        int InsertBetRecordList(List<BetRecord> list);

        [OperationContract]
        Dictionary<string, double> GetRemaindCount(string issue, int playtype, int playtyperadio, string nums);

        //=================
        [OperationContract]
        int UpdateLotteryNums(LotteryNumsInfo info);

        [OperationContract]
        int InsertLotteryNums(LotteryNumsInfo info);

        [OperationContract]
        List<LotteryNumsInfo> getIsNotPJ(int type);

        [OperationContract]
        int UpdateLotteryFlag(int Flag, Int64 LotteryId, string issueNo);

        [OperationContract]
        List<BetRecord> getOrders(string IssueNo, int type);

        [OperationContract]
        List<LotteryNumsInfo> updatePjStatus(int status, int type);

        //[OperationContract]
        //int UpdateOrdersWinInfo(BetRecord record);

        [OperationContract]
        bool UpdateOrdersWinInfo(List<BetRecord> betrecord_list);

        //================

        [OperationContract]
        int WriteLoginLog(Log log);

        [OperationContract]
        string GetRejectOrderID(string userID);

        [OperationContract]
        string GetVersion();

		[OperationContract]
		string Test();

    }
}
